<?php
namespace app\api\controller\V22;

use app\api\controller\Base;


class Merchant extends Base
{
    // 不需要验证
    protected $excludeValidateCheck = [

    ];

    // 定义自动实例化模型
    protected $ModelPath = 'Merchant';

    public function inviteInformation(){
        $userId = request()->UserModel->id;
        $merchantInfo = $this->M->where('user_id', $userId)->find();
//        dd($inviteCode);
        $posterPath = $qrcodePath = $this->generateImageByMerchant($merchantInfo['id']);
//        $posterPath = $this->merge($userId, $inviteCode, $qrcodePath);
//        $imgPath = \app\model\Base::getOssUrl();
//        var_dump($posterPath);
        //整理数据
        $data = [
            'code'=>$qrcodePath,
            'imgs'=> $posterPath,
        ];
        //响应数据
        return showSuccess($data);
    }
}